package src.zhuzi.spring.aop;

public class CalFaberRicciProxy implements ICalFaberRicci{
	private ICalFaberRicci icf;
	public CalFaberRicciProxy(ICalFaberRicci icf) {
		this.icf = icf;
	}
	
	@Override
	public long calFaberRicciByLoop(long n) {
		long rel = 0;
		long start = System.currentTimeMillis();
		rel = icf.calFaberRicciByLoop(n);
		long end = System.currentTimeMillis();
		System.out.println("循环耗费的时间："+(end-start)+"毫秒");
		return rel;
	}

	@Override
	public long calFaberRicciByRecursion(long n) {
		long rel = 0;
		long start = System.currentTimeMillis();
		rel = icf.calFaberRicciByRecursion(n);
		long end = System.currentTimeMillis();
		System.out.println("递归耗费的时间："+(end-start)+"毫秒");
		return rel;
	}
}